﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using DevExpress.LookAndFeel;
using QLKDS.Forms;
using Settings = QLKDS.Properties.Settings;

namespace QLKDS
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            
            DevExpress.Skins.SkinManager.EnableFormSkins();
            DevExpress.UserSkins.BonusSkins.Register();
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Office 2010 Blue");
            //if (Settings.Default.Success == true)
            //{
            //    frmConfigDatabase formConfigDatabase = new frmConfigDatabase();
            //    if (formConfigDatabase.ShowDialog() == DialogResult.OK)
            //    {
            //        Login();
            //    }
            //}
            //else
            //{
                Login();
           // }
        }

        private static void Login()
        {
            frmLogin formLogin = new frmLogin();
            //QLKDS.DAL.QLKDSDataContext db = new DAL.QLKDSDataContext();
            //var a = db.Connection.ConnectionString;
          //  if (formLogin.ShowDialog() == DialogResult.OK)
            {
                Application.Run(new frmMain());
            }
        }
    }
}